package com.wsm.springcloud_compose.compose_user_consumer_ribbon.controller;

import com.wsm.springcloud_compose.compose_user_bean.response.SysUsersResponse;
import com.wsm.springcloud_compose.compose_user_consumer_ribbon.service.UserService;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.RestController;

/**
 * @name: AdminController
 * @Author: wangshimin
 * @Date: 2019-09-01  17:25
 * @Description:
 */
@Api(tags = "Ribbon消费者")
@RestController
public class AdminController {

    @Autowired
    private UserService userService;

    @ApiOperation(value = "登录")
    @RequestMapping(value = "/login", method = RequestMethod.GET)
    public SysUsersResponse login(@RequestParam String userName) {
        return userService.login(userName);
    }
}